<!-- LISTAGEM -->
<div ui-view="" class="ng-scope" ng-show="list"><!-- uiView:  -->
	<div ui-view="" class="ng-scope"><!-- uiView:  -->
		<div class="pageheader ng-scope">
		    <h1>Subgrupo</h1>
		    <div class="breadcrumb-wrapper hidden-xs">
				<span class="label">Você está aqui:</span>
				<ol class="breadcrumb">
		            <li ><a href="#/home">Home</a></li>
		            <li >Administradora</li>
		            <li >Financeiro</li>
		            <li >Movimento</li>
		            <li class="active">Subgrupo - Pesquisa</li>
		            <!-- 
		            <li class="active">Blank Page</li>
		             -->
		        </ol>
			</div>
		</div>
		<div ui-view="" class="ng-scope"><!-- uiView:  -->
		    <section id="main-content" class="animated fadeInRight ng-scope">
				<div class="col-md-6" style="width: 100%">
		            <div class="panel panel-primary">
						<div class="panel-heading">
							<h3 class="panel-title">Pesquisa .: Filtros</h3>
							<div class="actions pull-right">
								<!-- <i data-fullscreen-widget="" class="fa fa-expand"></i>  -->
	 							<i data-widget-toggle="" class="fa fa-chevron-down"></i>
								<!-- <i data-widget-close="" class="fa fa-times"></i> -->
							</div>
						</div>
	                    <div class="panel-body" style="display: block;">
							<div class="panel-body">
		                        <form class="form-horizontal ng-pristine ng-valid" role="form">
									<div class="form-group">
										<label for="inputEmail2" class="col-sm-2 control-label" style="padding-right: 0px;">
											Nome Subgrupo:
										</label>
										<div class="col-sm-10">
											<input type="search" class="form-control" id="inputNomeSubgrupo" placeholder="Nome Subgrupo" ng-model="filtro.nomeSubgrupo">
										</div>
	                                </div>
									<div class="form-group">
										<label for="inputEmail2" class="col-sm-2 control-label" style="padding-right: 0px;">
											Nome Grupo:
										</label>
										<div class="col-sm-10">
											<input type="search" class="form-control" id="inputNomeGrupo" placeholder="Nome Grupo" ng-model="filtro.nomeGrupo">
										</div>
	                                </div>
									<div class="form-group">
										<div class="col-sm-offset-2 col-sm-10">
											<button type="submit" class="btn btn-primary" ng-click="retrieveFilter()">Pesquisar</button>
											<button type="submit" class="btn btn-success" ng-click="create()">Novo Registro</button>
										</div>
									</div>
								</form>
		                    </div>
	                    </div>
					</div>
				</div>
				<div class="col-md-6" style="width: 100%">
		            <div class="panel panel-primary">
						<div class="panel-heading">
							<h3 class="panel-title">Pesquisa .: Resultados</h3>
							<div class="actions pull-right">
								<!-- <i data-fullscreen-widget="" class="fa fa-expand"></i>  -->
	 							<i data-widget-toggle="" class="fa fa-chevron-down"></i>
								<!-- <i data-widget-close="" class="fa fa-times"></i> -->
							</div>
						</div>
	                    <div class="panel-body" style="display: block;">
							<table class="table table-striped">
								<thead>
									<tr>
										<th width="180px">Opções</th>
										<th width="100px">#</th>
										<th>
											<table width="100%">
												<tr>
													<td width="50%">Nome</td>
													<td width="50%">Grupo</td>
												</tr>
											</table>
										</th>
									</tr>
								</thead>
								<tbody>
									<tr ng-repeat="unidade in lista">
										<td  width="180px">
											<button class="btn btn-warning btn-sm" ng-click="update(unidade)">
											  <span class="glyphicon glyphicon-pencil"></span>
											  Editar
											</button>
											<button class="btn btn-danger btn-sm" ng-click="dlete(unidade)">
											  <span class="glyphicon glyphicon-remove"></span>
											  Excluir
											</button>
										</td>
										<td width="100px" style="vertical-align: middle;">{{unidade.id}}</td>
										<td style="vertical-align: middle;">
											<table width="100%">
												<tr>
													<td width="50%">{{unidade.nome}}</td>
													<td width="50%">{{unidade.grupo.nome}}</td>
												</tr>
											</table>
										</td>
									</tr>
							  </tbody>
							</table>
	                    </div>
					</div>
				</div>
			</section>
		</div>
	</div>
</div>
<!-- LISTAGEM -->

<!-- FORMULARIO  -->
<div ui-view="" class="ng-scope" ng-hide="list"><!-- uiView:  -->
	<div ui-view="" class="ng-scope"><!-- uiView:  -->
		<div class="pageheader ng-scope">
		    <h1>Subgrupo</h1>
		    <div class="breadcrumb-wrapper hidden-xs">
				<span class="label">Você está aqui:</span>
				<ol class="breadcrumb">
		            <li ><a href="#/home">Home</a></li>
		            <li >Administradora</li>
		            <li >Financeiro</li>
		            <li >Movimento</li>
		            <li class="active">Subgrupo - Formulário</li>
		            <!-- 
		            <li class="active">Blank Page</li>
		             -->
		        </ol>
			</div>
		</div>
		<div ui-view="" class="ng-scope"><!-- uiView:  -->
		    <section id="main-content" class="animated fadeInRight ng-scope">
				<div class="col-md-6" style="width: 100%">
		            <div class="panel panel-primary">
						<div class="panel-heading">
							<h3 class="panel-title">Formulário .: Dados</h3>
							<div class="actions pull-right">
								<!-- <i data-fullscreen-widget="" class="fa fa-expand"></i>  -->
	 							<i data-widget-toggle="" class="fa fa-chevron-down"></i>
								<!-- <i data-widget-close="" class="fa fa-times"></i> -->
							</div>
						</div>
				  		<form name="userForm" class="form-horizontal" role="form">
							<div class="modal-body">
						        <div class="form-group">
						            <label for="inputId" class="col-sm-2 control-label">Id:</label>
						            <div class="col-sm-10">
						                <input type="text" class="form-control" id="inputId" placeholder="Id" ng-model="unidade.id" disabled="disabled" />
						            </div>
						        </div>
						        <div class="form-group">
						            <label for="inputNome" class="col-sm-2 control-label">Nome:</label>
						            <div class="col-sm-10">
						                <input type="text" class="form-control" id="inputNome" placeholder="Nome" ng-model="unidade.nome" required />
						            </div>
						        </div>
						        <div class="form-group">
						            <label for="inputGrupo" class="col-sm-2 control-label">Grupo:</label>
						            <div class="col-sm-10">
						                <select class="form-control" id="inputGrupo" ng-model="unidade.grupo.id" ng-options="grupo.id as grupo.nome for grupo in grupos">
						                	<option value="">Selecione um grupo...</option>
						                </select>
						            </div>
						        </div>
						    </div>
							<div class="modal-footer ng-scope">
							    <button class="btn btn-default" ng-click="cancel()">Voltar</button>
							    <button class="btn btn-primary" ng-click="save(userForm.$valid)" type="submit">Salvar</button>
							</div>
					    </form>
					</div>
				</div>
			</section>
		</div>
	</div>
</div>
<!-- FORMULARIO -->
